<template>
        <div class="goodsEntry">
          <div style="padding:20px">
              <el-button type="primary" @click="returnOver">返回</el-button>
            
                <!-- <ul class="query">
                        <li class="query-item">
                         商品名称：{{tableData[0].goods_name}}
                        </li>
                        <li class="query-item">
                         入库类型：{{tableData[0].}}
                        </li>
                        <li class="query-item">
                        入库时间：{{tableData[0].}}
                        </li>
                        <li class="query-item">
                        经办人：
                        </li>
                        <li class="query-item">
                        订单号：
                        </li>
                        <li class="query-item">
                        用户ID：
                        </li>
                      </ul> -->
              <div style="margin-top:20px">入库数量</div>
                <div class="wrapper">
                        <el-table class="table" :data="tableData" stripe highlight-current-row border>
                          
                          <el-table-column align="center" prop="goodsName" label="商品名称">
                          </el-table-column>
                          <!-- <el-table-column align="center" prop="inType" label="入库类型">
                          </el-table-column> -->
                          <!-- <el-table-column align="center" prop="sku_no" label="入库时间">
                          </el-table-column> -->
                          <!-- <el-table-column align="center" prop="goods_no" label="经办人">
                          </el-table-column> -->
                          <el-table-column align="center" prop="odorType" label="香型">
                            </el-table-column>
                         <el-table-column align="center" prop="netContent" label="净含量">
                          </el-table-column>
                          <el-table-column align="center" prop="sumPcs" label="购买总量">
                          </el-table-column>
                          <el-table-column align="center" prop="unit" label="单位">
                          </el-table-column>
                          <el-table-column align="center" prop="alocohl" label="酒精度">
                          </el-table-column>
                          <el-table-column align="center" prop="rawDesc" label="原料">
                          </el-table-column>
                         
                         
                        </el-table>
                      
                </div>
                <div>酒的信息</div>
                <div class="wrapper">
                        <el-table class="table" :data="kindData" stripe highlight-current-row border>
                          
                          <el-table-column align="center" prop="goods_id" label="商品ID">
                          </el-table-column>
                          <el-table-column align="center" prop="create_time" label="酒厂新酒入库时间">
                          </el-table-column>
                          <el-table-column align="center" prop="current_status" label="酒的状态">
                          </el-table-column>
                          <el-table-column align="center" prop="area_name" label="存放位置">
                          </el-table-column>
                        
                        </el-table>
                       
                </div>
          </div>
         
          <!-- <el-dialog title="商品种类" :visible.sync="goodsCates.show" class="goods-dialog">
            <el-table class="dialog-table" :data="goodsCates.tableData" stripe highlight-current-row border :height="height">
              <el-table-column align="center" prop="date" label="序号">
              </el-table-column>
              <el-table-column align="center" prop="name" label="SKU编码">
              </el-table-column>
              <el-table-column align="center" prop="name" label="商品编码">
              </el-table-column>
              <el-table-column align="center" prop="date" label="商品名称">
              </el-table-column>
              <el-table-column align="center" prop="name" label="商品类别">
              </el-table-column>
              <el-table-column align="center" prop="name" label="香型">
              </el-table-column>
              <el-table-column align="center" prop="date" label="净含量">
              </el-table-column>
              <el-table-column align="center" prop="name" label="单位">
              </el-table-column>
              <el-table-column align="center" prop="name" label="酒精度">
              </el-table-column>
              <el-table-column align="center" prop="name" label="原料">
              </el-table-column>
              <el-table-column align="center" prop="name" label="数量">
              </el-table-column>
            </el-table>
          </el-dialog> -->
        </div>
      </template>
      
      <script>
        export default {
          data() {
            return {
              height: "auto",
              skuNo:this.$route.params.id,
              kindData:[],
              queryData: {
                startTime:'',
                endTime:'',
                // goodsId:'',
                storeId:'',
                inType:''
              },
              selectedOptions:[],
              // goodsCates: {
              //   show: false,
              //   tableData: [{}]
              // },
              tableData: [{}],
              
              endtime:'',
              page: {
                pageSize: 10,
                current: 1,
                total: 100
              }
            };
          },
          mounted () {
              console.log(this.$route)
            // this.area();
            this.tableList();
          },
          methods: {
               //初始化数据
          async tableList() {
            try {
                let { data } = await this.$post({
                    api: "/show/sku/detail",
                    data:{
                        skuNo:this.skuNo
                    }
                  });
                  if (data.code === 0) {

                      console.log(data)
                    this.tableData = data.data.info;
                    this.kindData = data.data.idtable;
                    
                  } else {
                    this.$message({
                      type: "error",
                      message: data.msg
                    });
                  }
                } catch (e) {
                  this.$message({
                    type: "error",
                    message: "接口报错"
                  });
                }
            },
            returnOver(){
              this.$router.go(-1);
            }
          }
        };
      </script>
      
      <style lang="scss" scoped>
        .query {
          overflow: hidden;
          border-bottom: 1px solid #eeeeee;
          &-item {
            float: left;
            margin: 15px 20px;
          }
          .el-input {
            width: 150px;
          }
          .el-button {
            margin: 0 15px;
            &:last-child {
              margin-right: 0;
            }
          }
        }
      
        .entry-info {
          padding: 15px 20px;
          border-bottom: 1px solid #eeeeee;
        }
      
        .goods-category {
          line-height: 32px;
          span {
            color: #0033ff;
            text-decoration: underline;
            cursor: pointer;
          }
        }
      
        .goods-count {
          line-height: 32px;
        }
      
        .goods-id {
          display: flex;
          justify-content: space-between;
          padding: 0 40px;
          border-left: 1px solid #000;
          border-right: 1px solid #000;
          span {
            position: relative;
            display: inline-block;
            padding: 8px 15px;
            border: 1px solid #333;
            &:after {
              content: "";
              position: absolute;
              top: -6px;
              left: -6px;
              width: 100%;
              height: 100%;
              padding: 6px;
              border: 1px solid #333;
            }
          }
        }
      
        .wrapper {
          padding: 10px 15px;
        }
      
        .canceloff-btn {
          color: #0033ff;
          cursor: pointer;
        }
      </style>